#ifndef __CE_NETIP_H__
#define __CE_NETIP_H__

#include "ce_core.h"

// addr type
#define CE_IPv4 AF_INET
#define CE_IPv6 AF_INET6
#define CE_UNIX AF_UNIX

typedef struct {
    ce_str_t        addr_str;
    uint8_t         type:6;
    uint8_t         with_port:1; 
    union {
        struct sockaddr     sa;
        struct sockaddr_in  sin;
        struct sockaddr_in6 sin6;
        struct sockaddr_un  sun;
    } addr;
} ce_netip_t;

#endif
